package com.project.thisDatabase.base.model.data;

import com.project.annotation.enums.data.SortType;
import lombok.Data;

@Data
public class SortItem {
    private String col;
    private SortType type;
    private int index;

    public SortItem(String col, SortType type, int index) {
        this.col = col;
        this.type = type;
        this.index = index;
    }

    @Override
    public String toString() {
        return String.format("%s %s", col, SortType.DESC.equals(type) ? "DESC" : "ASC");
    }

}
